/* 全局 CSS 变量 */
:root {
  /* 重置element ui plus 组件样式 */
  --el-color-danger: #ff3e34 !important;

  /* 颜色系统 */
  /* --el-color-primary: #ffe500 !important; */
  --primary-color: #409eff;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;

  /* 文本颜色 */
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --text-placeholder: #c0c4cc;

  /* 边框颜色 */
  --border-base: #dcdfe6;
  --border-light: #e4e7ed;
  --border-lighter: #ebeef5;
  --border-extra-light: #f2f6fc;

  /* 背景颜色 */
  --bg-base: #ffffff;
  --bg-light: #f5f7fa;
  --bg-lighter: #fafafa;

  /* 阴影 */
  --shadow-base: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  --shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);

  /* 字体 */
  font-family: "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
    "Droid Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  font-weight: 400;

  /* 字体渲染优化 */
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 全局重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  /* height: 100%; */
  background-color: var(--bg-light);
  /* color: var(--text-regular); */
  color: #fff;
}

#app {
  height: 100%;
  width: 100%;
}

/* 链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--primary-color);
}

/* 标题样式 */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

h5 {
  font-size: 14px;
}

h6 {
  font-size: 12px;
}

/* 段落样式 */
p {
  margin-bottom: 16px;
}

/* 列表样式 */
ul,
ol {
  margin: 0;
  padding-left: 20px;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
}

.el-table tr {
  background-color: transparent !important;
}

.el-loading-spinner .el-loading-text {
  color: #fff !important;
}

.el-loading-spinner .path {
  stroke: #fff !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #121517;
}

::-webkit-scrollbar-thumb {
  /* background: #121517; */
  /* background: #070809; */
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #070809;
  /* background: var(--text-placeholder); */
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--primary-color);
}

.text-success {
  color: var(--success-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-danger {
  color: var(--danger-color);
}

.text-info {
  color: var(--info-color);
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.ml-10 {
  margin-left: 10px;
}

.ml-20 {
  margin-left: 20px;
}

.mr-10 {
  margin-right: 10px;
}

.mr-20 {
  margin-right: 20px;
}

.pt-10 {
  padding-top: 10px;
}

.pt-20 {
  padding-top: 20px;
}

.pb-10 {
  padding-bottom: 10px;
}

.pb-20 {
  padding-bottom: 20px;
}

.pl-10 {
  padding-left: 10px;
}

.pl-20 {
  padding-left: 20px;
}

.pr-10 {
  padding-right: 10px;
}

.pr-20 {
  padding-right: 20px;
}

.ellipsis1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ellipsis2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* element-plus 样式重置 */

/* 卡片样式重置 */
.el-card {
  border: none !important;
  color: #fff !important;
  box-shadow: none !important;
  background: transparent !important;

  .el-card__body {
    padding: 0 !important;
  }
}

/* 抽屉样式重置 */
.el-drawer {
}

.el-overlay {
  .el-drawer__body {
    padding: 0 !important;
  }
}

/* 对话框样式重置 */
.el-dialog {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #141414 !important;
  border: 1px solid #46484a !important;
  border-radius: 4px !important;
  overflow: hidden;

  .el-dialog__header {
    padding-bottom: 0 !important;
  }

  .el-dialog__footer {
    padding-top: 0 !important;
    padding-bottom: 38px;

    .el-button {
      width: 135px;
      height: 50px;
      background: #232527;
      border: #232527;
      color: #e2e2e2;
      font-size: 14px;
      font-weight: bold;

      &.el-button--primary {
        background: #ffe500;
        border-color: #ffe500;
        color: #121212;
      }

      /* &.block-btn {
        width: 100%;
        background: #ffe500;
        border-color: #ffe500;
        color: #121212;
      } */
    }
  }
}

/* 选项卡样式重置 */
.el-tabs__item.is-active {
  color: #fff !important;
}

/* 按钮样式重置 */
.el-button:focus-visible {
  outline: none !important;
}

/* 重置输入框高度 */
.el-input {
  height: 50px;
  --el-input-text-color: #fff !important;

  --el-input-border-color: #4a4847 !important;
  --el-input-border: #4a4847 !important;
  --el-input-hover-border: #4a4847 !important;
  --el-input-border-color: #4a4847 !important;
  --el-input-border-radius: 4px !important;
  /* --el-input-transparent-border: 0 0 0 1px transparent inset; */
  --el-input-bg-color: var(--el-fill-color-blank);
  --el-input-icon-color: #4a4847 !important;
  --el-input-placeholder-color: #888 !important;
  --el-input-hover-border-color: #4a4847 !important;
  --el-input-clear-hover-color: #4a4847 !important;

  /* --el-input-focus-border: #ffe500 !important; */
  --el-input-focus-border-color: #ffe500 !important;
  box-sizing: border-box;
}

.el-input__wrapper {
  box-shadow: none;
  border: 1px solid #47494a;
  background-color: #2e3031 !important;
}

/* .el-input__inner {
  background: #2E3031 !important;
} */
.el-input__inner {
  background: transparent !important;
}

.el-input__inner::placeholder {
  color: #888;
}

.el-input__icon {
  color: #888;
}

.el-input__wrapper.is-focus {
  border-color: #ffe500 !important;

  .el-input__inner {
    caret-color: #ffe500 !important;
    /* color: #ffe500 !important; */
    color: #fff !important;
  }
}

/* 抽屉样式重置 */
.is-drawer {
  width: 1280px;
  height: 800px !important;
  margin: 0 auto;
}

.el-drawer__header {
  padding: 0 !important;
  margin-bottom: 0 !important;
}

/* 链接样式重置 */
.el-link {
  color: #fff !important;
}

.el-link:hover {
  color: #fff !important;
}

.is-hover-underline {
  text-decoration: underline;
}

/* 自定义消息图标 */
.custom-success-message-icon {
  background: #26ca75 !important;
  border-color: #26ca75 !important;
  border-radius: 4px !important;

  .el-message__content {
    color: #fff !important;
  }
}

.custom-error-message-icon {
  background: #d55928 !important;
  border-color: #d55928 !important;
  border-radius: 4px !important;

  .el-message__content {
    color: #fff !important;
  }
}

.custom-warning-message-icon {
  background: #eba518 !important;
  border-color: #eba518 !important;
  border-radius: 4px !important;

  .el-message__content {
    color: #fff !important;
  }
}

.custom-success-message-icon .el-message__icon,
.custom-error-message-icon .el-message__icon,
.custom-warning-message-icon .el-message__icon {
  display: none !important;
}

.custom-success-message-icon .el-message__content,
.custom-error-message-icon .el-message__content,
.custom-warning-message-icon .el-message__content {
  display: flex;
  align-items: center;
}

svg,
.svg_icon {
  width: 24px;
  height: 24px;
  fill: #888;
  /* stroke: #888; */
  cursor: pointer;

  &:hover {
    fill: #fff !important;
  }
}

.custom-popover {
  background-color: #000 !important;
  border-color: #000 !important;

  .el-popper__arrow:before {
    background: #000;
    border: 1px solid #000;
  }

  p {
    color: #fff !important;
    margin: 0;
  }
}

.game-popover {
  padding: 0 !important;
  border: none !important;
  background: #232527 !important;

  .popover-content {
    border-radius: 4px !important;
    border: none !important;
    padding: 0 !important;

    .popover-img {
      width: 100%;
      height: 223px;
      object-fit: cover;
      border-radius: 4px;
    }

    .popover-info {
      padding: 20px;

      .popover-title {
        font-size: 20px;
        font-weight: 600;
        color: #ffffff;
        margin: 0 0 8px 0;
      }

      .popover-slogan {
        font-size: 13px;
        color: #949495;
        margin: 0 0 12px 0;
        line-height: 1.4;
      }

      .game-stats {
        display: flex;
        gap: 10px;

        .stat-item {
          height: 20px;
          line-height: 20px;
          text-align: center;
          display: flex;
          align-items: center;
          background: #121517;
          color: #888;
          font-size: 12px;
          border-radius: 4px;
          gap: 4px;
          border: none !important;
        }
      }
    }
  }
}

/* 全局样式 - popover动画效果 */
.game-popover {
  /* animation: popoverSlideIn 0.1s ease-out forwards; */
}

@keyframes popoverSlideIn {
  from {
    transform: translateX(-10px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.custom-select-popper {
  background: #36393c !important;
  border: 1px solid #36393c !important;
  .el-select-dropdown__item.is-selected {
    color: #ffffff !important;
  }
  .is-light > __arrow:before {
    background: #36393c !important;
    border: 1px solid #36393c !important;
  }
  .el-select-dropdown__item.is-hovering {
    background-color: #292c2f;
  }
}
